
<!--某些字体图标-->
<link href="__SHOP_DEFAULT__/custom/css/iconfont.css" rel="stylesheet" />
<link href="__SHOP_DEFAULT__/custom/css/font-family.css" rel="stylesheet" />

<link rel="stylesheet" href="__SHOP_DEFAULT__/custom/css/base.css">
	
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<?php if ($hidden_ncToolbar != 1) {?>
<div id="vToolbar" class="nc-appbar">
  	<div class="nc-appbar-tabs" id="appBarTabs">
    	<?php if (session('is_login')) {?>
	    <div class="user ta_delay" nctype="a-barUserInfo">
	      	<div class="avatar">
	      		<img src="<?php echo getMemberAvatar(session('avatar'));?>"/>
	      	</div>
	      	<p>我</p>
	    </div>
	    <div class="user-info" nctype="barUserInfo" style="display:none;">
	    	<i class="arrow"></i>
	      	<div class="avatar">
	      		<img src="<?php echo getMemberAvatar(session('avatar'));?>"/>
	        	<div class="frame"></div>
	      	</div>
		    <dl>
		        <dt>Hi, <a href="<?php echo url('member/shop/index');?>"><?php echo session('member_name');?></a></dt>
		     <!--    <dd>当前等级：<strong nctype="barMemberGrade"><?php echo $member_info['level_name'];?></strong></dd>
		     <dd>当前经验值：<strong nctype="barMemberExp"><?php echo $member_info['member_exppoints'];?></strong></dd> -->
		    </dl>
	    </div>
    	<?php } else {?>
    	<div class="user ta_delay" nctype="a-barLoginBox">
	      	<div class="avatar">
	      		<img src="<?php echo getMemberAvatar(session('avatar'));?>"/>
	      	</div>
	      	<p>未登录</p>
    	</div>
    	<div class="user-login-box" nctype="barLoginBox" style="display:none;"> 
    		<i class="arrow"></i> 
    		<a href="javascript:void(0);" class="close-a" nctype="close-barLoginBox" title="关闭">X</a>
      		<form id="login_form" method="post" action="<?php echo url('member/login/index');?>" onsubmit="ajaxpost('login_form', '', '', 'onerror')">
        	<dl>
          		<dt><strong>登录账号</strong></dt>
		        <dd>
		            <input type="text" class="text" tabindex="1" autocomplete="off"  name="user_name" autofocus >
		            <label></label>
		        </dd>
        	</dl>
	        <dl>
	          	<dt>
	          		<strong>登录密码</strong>
	          		<a href="<?php echo url('member/login/forget_password');?>" target="_blank">忘记登录密码？</a>
	          	</dt>
	          	<dd>
	            	<input tabindex="2" type="password" class="text" name="password" autocomplete="off">
	            	<label></label>
	          	</dd>
	        </dl>
        	<?php if(sysconf('captcha_status_login') == '1') { ?>
	        <dl>
	          	<dt><strong>验证码</strong><a href="javascript:void(0)" class="ml5" onclick="javascript:document.getElementById('codeimage').src='<?php echo SHOP_SITE_URL?>/index.php?act=seccode&op=makecode&nchash=<?php echo getNchash('login','index');?>&t=' + Math.random();">更换验证码</a></dt>
		        <dd>
		            <input tabindex="3" type="text" name="captcha" autocomplete="off" class="text w130" id="captcha2" maxlength="4" size="10" />
		            <img src="" name="codeimage" border="0" id="codeimage" class="vt">
		            <label></label>
		        </dd>
	        </dl>
        	<?php } ?>
            <div class="bottom">
              	<input type="submit" class="submit" value="确认">
              	<input type="hidden" value="" name="ref_url">
	            <a href="<?php echo url('member/login/register', array('ref_url' => I('get.ref_url')));?>" target="_blank">注册新用户</a>
	            <?php if (sysconf('qq_isuse') == 1 || sysconf('sina_isuse') == 1 || sysconf('weixin_isuse') == 1){?>
	            <h4>使用合作网站账号登录：</h4>
	            <?php if (sysconf('weixin_isuse') == 1){?>
	            <a href="javascript:void(0);" onclick="ajax_form('weixin_form', '微信账号登录', '<?php echo url('connect_wx/index');?>', 360);" title="微信账号登录" class="mr20">微信</a>
	            <?php } ?>
	            <?php if (sysconf('sina_isuse') == 1){?>
	            <a href="<?php echo MEMBER_SITE_URL;?>/index.php?act=connect_sina" title="新浪微博账号登录" class="mr20">新浪微博</a>
	            <?php } ?>
	            <?php if (sysconf('qq_isuse') == 1){?>
	            <a href="<?php echo MEMBER_SITE_URL;?>/index.php?act=connect_qq" title="QQ账号登录" class="mr20">QQ账号</a>
	            <?php } ?>
	            <?php } ?>
          	</div>
     	</form>
    </div>
    <?php }?>
    <ul class="tools">
         <li><a href="http://wpa.qq.com/msgrd?v=3&amp;uin={:sysconf('site_qq')}&amp;site=qq&amp;menu=yes" id="chat_show_user" class="chat ta_delay"><div class="tools_img"></div><span>QQ客服</span><i id="new_msg" class="new_msg" style="display:none;"></i></a></li>
      <?php if (!$hidden_rtoolbar_cart) { ?>
      <li><a href="javascript:void(0);" id="rtoolbar_cart" class="cart ta_delay"><div class="tools_img"></div><span>购物车</span><i id="rtoobar_cart_count" class="new_msg" style="display:none;"></i></a></li>
      <?php } ?>
      <?php if (!$hidden_rtoolbar_compare) { ?>
      <li><a href="javascript:void(0);" id="compare" class="compare ta_delay"><div class="tools_img"></div><span>对比</span></a></li>
      <?php } ?>
      <li><a href="javascript:void(0);" id="gotop" class="gotop ta_delay"><div class="tools_img"></div><span>顶部</span></a></li>
    </ul>
    <div class="content-box" id="content-compare">
      <div class="top">
        <h3>商品对比</h3>
        <a href="javascript:void(0);" class="close" title="隐藏"></a></div>
      <div id="comparelist"></div>
    </div>
    <div class="content-box" id="content-cart">
      <div class="top">
        <h3>我的购物车</h3>
        <a href="javascript:void(0);" class="close" title="隐藏"></a></div>
	      <div id="rtoolbar_cartlist"></div>
    </div>
    <a id="activator" href="javascript:void(0);" class="nc-appbar-hide"></a> </div>
  <div class="nc-hidebar" id="ncHideBar">
    <div class="nc-hidebar-bg">
      <?php if (session('is_login')) {?>
      <div class="user-avatar"><img src="<?php echo getMemberAvatar(session('avatar'));?>"/></div>
      <?php } else {?>
      <div class="user-avatar"><img src="<?php echo getMemberAvatar(session('avatar'));?>"/></div>
      <?php }?>
      <div class="frame"></div>
      <div class="show"></div>
  </div>
</div>
</div>
<?php } ?>
	
	

<?php if (sysconf('hao_top_banner_status')>0 && $index_sign == 'index' && $index_sign != '0'){ ?>
<div style=" background:<?php echo sysconf('hao_top_banner_color'); ?>;">
  	<div class="wrapper" id="top-banner" style="display: none;">
      	<a href="javascript:void(0);" class="close" title="关闭"></a>
      	<a href="<?php echo sysconf('hao_top_banner_url'); ?>" title="<?php echo sysconf('hao_top_banner_name'); ?>">
      		<img border="0" src="<?php echo UPLOAD_SITE_URL.DS.ATTACH_COMMON.DS.sysconf('hao_top_banner_pic'); ?>" alt="">
      	</a>
  	</div>
</div>
<?php } ?>
<div class="public-top-layout w">
    <div class="topbar wrapper">
        <div class="service fl">
            <div class="tel">您好，欢迎来到康乐茶文化城</div>
    	</div>
    	
    	<div class="quick-menu">
		<?php if (sysconf('mobile_isuse') && sysconf('mobile_app')){?>
		  <dl class="down_app">
		          <dt><em class="ico_tel"></em><a href="<?php echo WAP_SITE_URL;?>">手机移动端</a><i></i></dt>
		                  <dd>
		         <div class="qrcode"><img src="<?php echo UPLOAD_SITE_URL.DS.ATTACH_COMMON.DS.sysconf('mobile_app');?>"></div>
		          <div class="hint">
		            <h4>扫描二维码</h4>
		            下载手机客户端</div>
		          <div class="addurl">
		            <?php if (sysconf('mobile_apk')){?>
		            <a href="<?php echo sysconf('mobile_apk');?>" target="_blank"><i class="icon-android"></i>Android</a>
		            <?php } ?>
		            <?php if (sysconf('mobile_ios')){?>
		            <a href="<?php echo sysconf('mobile_ios');?>" target="_blank"><i class="icon-apple"></i>iPhone</a>
		            <?php } ?>
		                          </div>
		      </dd>      </dl>
		      <?php } ?>
		    <dl>
		        <dt><a href="<?php echo url('member/order/index');?>">我的订单</a></dt>
		       
		    </dl>
		    
		    <dl>
		        <dt>客户服务<i></i></dt>
		        <dd>
		          	<ul>
			            <li><a href="<?php echo url('home/article/article', array('ac_id' => 2));?>">帮助中心</a></li>
			            <li><a href="<?php echo url('home/article/article', array('ac_id' => 5));?>">售后服务</a></li>
			            <li><a href="<?php echo url('home/article/article', array('ac_id' => 6));?>">客服中心</a></li>
			              <li><a href="http://wpa.qq.com/msgrd?v=3&amp;uin=870900092&amp;site=qq&amp;menu=yes">在线客服</a></li>
		          	</ul>
		        </dd>
		    </dl>
		    <dl>
		        <dt>
		        	<a href="<?php echo url('shop/showjoinin/index');?>" title="商家管理">
		        		商家管理
		        	</a>
		        	<i></i>
		        </dt>
		        <dd>
		          	<ul>
				   	 	<li><a href="<?php echo url('shop/showjoinin/index');?>" title="招商入驻">招商入驻</a></li>
		            	<li><a href="<?php echo url('seller/sellerlogin/show_login');?>" target="_blank" title="商家登录">商家登录</a></li>
		          	</ul>
			 	</dd>
		    </dl>

      		<?php
			    if(!empty($nav_list) && is_array($nav_list)){
				    foreach($nav_list as $nav){
				      	if($nav['nav_location']<1){
				      		$nav_list_top[] = $nav;
				      	}
				    }
			    }
      			if(!empty($nav_list_top) && is_array($nav_list_top)){
      		?>
			    <dl>
			        <dt>网站导航<i></i></dt>
			        <dd>
			          <ul>
			            <?php foreach($nav_list_top as $nav){?>
			            <li><a
			        <?php
			        if($nav['nav_new_open']) {
			            echo ' target="_blank"';
			        }
			        echo ' href="';
			        switch($nav['nav_type']) {
			        	case '0':echo $nav['nav_url'];break;
			        	case '1':echo url('shop/search/index', array('cate_id'=>$nav['item_id']));break;
			        	case '2':echo url('member/article/article', array('ac_id'=>$nav['item_id']));break;
			        	case '3':echo url('shop/activity/index', array('activity_id'=>$nav['item_id']));break;
			        }
			        echo '"';
			        ?>><?php echo $nav['nav_title'];?></a></li>
			            <?php }?>
			          </ul>
			        </dd>
			    </dl>
      		<?php } ?>
    	</div>
    	<div class="head-user-mall">
		    <dl class="my-mall">
		        <dt>
		        	<span class="ico"></span>
		        	<a href="<?php echo url('member/shop/index');?>" title="我的商城">我的商城</a>
		        	<i class="arrow"></i>
		        </dt>
		        <dd>
		          	<div class="user-centent-menu">
			            <ul>
				            <!--<li><a href="<?php echo MEMBER_SITE_URL;?>/index.php?act=member_message&op=message">站内消息(<span><?php echo $message_num>0 ? $message_num:'0';?></span>)</a></li>-->
				            <li><a href="<?php echo url('member/order/index');?>" class="arrow">我的订单<i></i></a></li>
				            <!--<li><a href="<?php echo SHOP_SITE_URL;?>/index.php?act=member_consult&op=my_consult">咨询回复(<span id="member_consult">0</span>)</a></li>-->
				            <li><a href="<?php echo url('member/favoritegoods/index');?>" class="arrow">我的收藏<i></i></a></li>
				            <!--<?php if (sysconf('voucher_allow') == 1){?>
				            <li><a href="<?php echo MEMBER_SITE_URL;?>/index.php?act=member_voucher">代金券(<span id="member_voucher">0</span>)</a></li>
				            <?php } ?>
				            <?php if (sysconf('points_isuse') == 1){ ?>
				            <li><a href="<?php echo MEMBER_SITE_URL;?>/index.php?act=member_points" class="arrow">我的积分<i></i></a></li>
				            <?php } ?>-->
			            </ul>
			        </div>
		          	<div class="browse-history">
			            <div class="part-title">
			              	<h4>最近浏览的商品</h4>
			              	<span style="float:right;">
			              		<!--<a href="<?php echo SHOP_SITE_URL;?>/index.php?act=member_goodsbrowse&op=list">全部浏览历史</a>-->
			              	</span> 
			            </div>
			            <ul>
			              	<li class="no-goods">
			              		<img class="loading" src="__SHOP_DEFAULT__/images/loading.gif" />
			              	</li>
			            </ul>
		          	</div>
		        </dd>
		    </dl>
		</div>
	
        
	    <div class="user-entry">
	      	您好, <?php if(session('is_login') == '1'){?>
	      		<span> <a href="<?php echo url('member/shop/index');?>"><?php echo session('member_name');?></a>
	      			
	      		</span>
	      		<span class="wr">
	      			<a href="<?php echo url('member/login/logout');?>">退出</a>
	      		</span>
	      	<?php }else{?>
	      		<span class="wr">
	      			<a class="login" href="<?php echo url('member/login/index');?>">请登录</a> 
	      			<a href="<?php echo url('member/login/register');?>">注册</a>
	      		</span>
	      	<?php }?>
	    </div>
  	</div>
</div>

<script type="text/javascript">	
//登录开关
var connect_qq = "<?php echo sysconf('qq_isuse')?>";
var connect_sn = "<?php echo sysconf('sina_isuse')?>";
var connect_wx = "<?php echo sysconf('weixin_isuse')?>";
var connect_weixin_appid = "<?php echo sysconf('weixin_appid');?>";

$(function() {
	$('#gotop').click(function(){
	        $('html, body').animate({
	            scrollTop: 0
	        }, 500);
	});
	//顶部banner
	var ynwebskey = getCookie('ynwebskey');
		if(ynwebskey){
		$("#top-banner").hide();
		} else {
			$("#top-banner").slideDown(800);
			}
		$("#top-banner .close").click(function(){
			setCookie('ynwebskey','yes',1);
			$("#top-banner").hide();
	});
	//我的商城
		$(".head-user-mall dl").hover(function() {
			$(this).addClass("hover");
		},
		function() {
			$(this).removeClass("hover");
		});
		$('.head-user-mall .my-mall').mouseover(function(){
			load_history_information()
			$(this).unbind('mouseover');
		});
	
		$('#activator').click(function() {
			$('#content-cart').animate({'right': '-250px'});
			$('#content-compare').animate({'right': '-250px'});
			$('#vToolbar').animate({'right': '-60px'}, 300,
			function() {
				$('#ncHideBar').animate({'right': '59px'},	300);
			});
	        $('div[nctype^="bar"]').hide();
		});
		$('#ncHideBar').click(function() {
			$('#ncHideBar').animate({
				'right': '-86px'
			},
			300,
			function() {
				$('#content-cart').animate({'right': '-250px'});
				$('#content-compare').animate({'right': '-250px'});
				$('#vToolbar').animate({'right': '6px'},300);
			});
		});
    $("#compare").click(function(){
    	if ($("#content-compare").css('right') == '-250px') {
 		   loadCompare(false);
 		   $('#content-cart').animate({'right': '-250px'});
  		   $("#content-compare").animate({right:'0px'});
    	} else {
    		$(".close").click();
    		$(".chat-list").css("display",'none');
        }
	});
    $("#rtoolbar_cart").click(function(){
        if ($("#content-cart").css('right') == '-250px') {
         	$('#content-compare').animate({'right': '-250px'});
    		$("#content-cart").animate({right:'0px'});
    		if (!$("#rtoolbar_cartlist").html()) {
    			$("#rtoolbar_cartlist").load('<?php echo SHOP_SITE_URL;?>/index.php?act=cart&op=ajax_load&type=html');
    		}
        } else {
        	$(".close").click();
        	$(".chat-list").css("display",'none');
        }
	});
	$(".close").click(function(){
		$(".content-box").animate({right:'-250px'});
      });

	$(".quick-menu dl").hover(function() {
		$(this).addClass("hover");
	},
	function() {
		$(this).removeClass("hover");
	});

    // 右侧bar用户信息
    $('div[nctype="a-barUserInfo"]').click(function(){
        $('div[nctype="barUserInfo"]').toggle();
    });
    // 右侧bar登录
    $('div[nctype="a-barLoginBox"]').click(function(){
        $('div[nctype="barLoginBox"]').toggle();
        document.getElementById('codeimage').src='<?php echo SHOP_SITE_URL?>/index.php?act=seccode&op=makecode&nchash=<?php echo getNchash('login','index');?>&t=' + Math.random();
    });
    $('a[nctype="close-barLoginBox"]').click(function(){
        $('div[nctype="barLoginBox"]').toggle();
    });
    <?php if ($cart_goods_num > 0) { ?>
    $('#rtoobar_cart_count').html(<?php echo $cart_goods_num;?>).show();
    <?php } ?>
    });
</script>